3.428 \(\int \cos ^3(c+d x) (a+b \tan ^2(c+d x)) \, dx\)

Optimal. Leaf size=32 \[ \frac{a \sin (c+d x)}{d}-\frac{(a-b) \sin ^3(c+d x)}{3 d} \]

[Out]

(a*Sin[c + d*x])/d - ((a - b)*Sin[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0345442, antiderivative size = 32, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.048, Rules used = {3676} \[ \frac{a \sin (c+d x)}{d}-\frac{(a-b) \sin ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^3*(a + b*Tan[c + d*x]^2),x]

[Out]

(a*Sin[c + d*x])/d - ((a - b)*Sin[c + d*x]^3)/(3*d)

Rule 3676

Int[sec[(e_.) + (f_.)*(x_)]^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]^(n_))^(p_.), x_Symbol] :> With[{ff = F
reeFactors[Sin[e + f*x], x]}, Dist[ff/f, Subst[Int[ExpandToSum[b*(ff*x)^n + a*(1 - ff^2*x^2)^(n/2), x]^p/(1 -
ff^2*x^2)^((m + n*p + 1)/2), x], x, Sin[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] &&
IntegerQ[n/2] && IntegerQ[p]

Rubi steps

\begin{align*} \int \cos ^3(c+d x) \left (a+b \tan ^2(c+d x)\right ) \, dx &=\frac{\operatorname{Subst}\left (\int \left (a-(a-b) x^2\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=\frac{a \sin (c+d x)}{d}-\frac{(a-b) \sin ^3(c+d x)}{3 d}\\ \end{align*}

Mathematica [A]  time = 0.0168688, size = 44, normalized size = 1.38 \[ -\frac{a \sin ^3(c+d x)}{3 d}+\frac{a \sin (c+d x)}{d}+\frac{b \sin ^3(c+d x)}{3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^3*(a + b*Tan[c + d*x]^2),x]

[Out]

(a*Sin[c + d*x])/d - (a*Sin[c + d*x]^3)/(3*d) + (b*Sin[c + d*x]^3)/(3*d)

________________________________________________________________________________________

Maple [A]  time = 0.077, size = 36, normalized size = 1.1 \begin{align*}{\frac{1}{d} \left ({\frac{b \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{3}}+{\frac{a \left ( 2+ \left ( \cos \left ( dx+c \right ) \right ) ^{2} \right ) \sin \left ( dx+c \right ) }{3}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^3*(a+b*tan(d*x+c)^2),x)

[Out]

1/d*(1/3*b*sin(d*x+c)^3+1/3*a*(2+cos(d*x+c)^2)*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.05688, size = 39, normalized size = 1.22 \begin{align*} -\frac{{\left (a - b\right )} \sin \left (d x + c\right )^{3} - 3 \, a \sin \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="maxima")

[Out]

-1/3*((a - b)*sin(d*x + c)^3 - 3*a*sin(d*x + c))/d

________________________________________________________________________________________

Fricas [A]  time = 1.42889, size = 74, normalized size = 2.31 \begin{align*} \frac{{\left ({\left (a - b\right )} \cos \left (d x + c\right )^{2} + 2 \, a + b\right )} \sin \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="fricas")

[Out]

1/3*((a - b)*cos(d*x + c)^2 + 2*a + b)*sin(d*x + c)/d

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a + b \tan ^{2}{\left (c + d x \right )}\right ) \cos ^{3}{\left (c + d x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**3*(a+b*tan(d*x+c)**2),x)

[Out]

Integral((a + b*tan(c + d*x)**2)*cos(c + d*x)**3, x)

________________________________________________________________________________________

Giac [A]  time = 1.55848, size = 49, normalized size = 1.53 \begin{align*} -\frac{a \sin \left (d x + c\right )^{3} - b \sin \left (d x + c\right )^{3} - 3 \, a \sin \left (d x + c\right )}{3 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^3*(a+b*tan(d*x+c)^2),x, algorithm="giac")

[Out]

-1/3*(a*sin(d*x + c)^3 - b*sin(d*x + c)^3 - 3*a*sin(d*x + c))/d